/*
 * LOGIQUE RELAIS ATV ARACOMB
 *
 * Copiright (c) 2013 Patrick DENIS (F5MTZ), Pierre COL (F8EGQ) and Florian MAZEN (F4FEZ)
 * 
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
#include <SPI.h>

#include <Wire.h>
#include <Bus_I2C.h>
#include "pinout.h"
#include "osd.h"


  
/**************************************************
*
*  CONFIGURATION PAR DEFAUT AU DEMARRAGE :
*
*  - QRG sur 1243 soit BCD du comtech sur 00
*  - Telecde Filtre 1243 sur ON
*  - Entree video 1 Activee bcd en 00
*  - Telecde mire sur OFF
*  - Telecde Alarme1 sur OFF
*  - Telecde Alarme2 sur OFF
*  - Telecde I2C-Ext sur ON
*
***************************************************/

// ********************************************************
void setup() {
  //Initialise les e/s
  pinMode(MAX7456SELECT,OUTPUT);
  digitalWrite(MAX7456SELECT,HIGH); //disable device
  pinMode(DATAOUT, OUTPUT);
  pinMode(DATAIN, INPUT);
  pinMode(SPICLOCK,OUTPUT);
  pinMode(VSYNC, INPUT);
  SPI.begin();
  //TODO : Ajouter des parametres complementaire d'initialisation du bus SPI
  delay(500);

  Serial.begin(9600);
  while (!Serial) { } // Compatibilite avec les cartes Leonardo.

  // Initialisation des périphérique
  osd_setVideoMode(OSD_PAL, OSD_SYNC_AUTO);
  osd_enable();
  osd_cls();
}




void loop() {
  
  
  
  
}
